package com.xuanyue.componentdemo.server;

import com.xuanyue.componentdemo.comment.token.MyTokenTool;
import com.xuanyue.componentdemo.entity.po.UserInfo;
import org.springframework.stereotype.Service;

@Service
public class TestAuthServer {

    public String login(){

        UserInfo user= new UserInfo();

        user.setUserId( "001" );
        user.setName( "XuanYue" );

        return MyTokenTool.createToken( user );

    }

    public UserInfo getUser(){
        return MyTokenTool.getUser();
    }


}
